package com.flyco.modules.pms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.flyco.modules.pms.entity.StmJdSkuStock;
import com.flyco.modules.pms.mapper.StmJdSkuStockMapper;
import com.flyco.modules.pms.service.IStmJdSkuStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 产品库存表
 * @Author: flyco
 * @Date: 2023-08-17
 * @Version: V1.0
 */
@Service
public class StmJdSkuStockServiceImpl extends ServiceImpl<StmJdSkuStockMapper, StmJdSkuStock> implements IStmJdSkuStockService {

    @Autowired
    private StmJdSkuStockMapper skuStockMapper;

    @Override
    public StmJdSkuStock getBySkuCode(String skuCode) {

        LambdaQueryWrapper<StmJdSkuStock> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(StmJdSkuStock::getFmaterialnumber, skuCode);
        return getOne(wrapper);
    }
}
